inputactivationcode

SoftwareShield ClientProtector COM Component > ClientProtector (SSCProtector) Reference > InputActivationCode

## InputActivationCode

The InputActivationCode function causes the ClientProtector to parse the Activation Code passed in and attempts to activate it against the currently loaded license - possibly changing the license state.

###### Syntax

HRESULT InputActivationCode ( BSTR ActivationCode, long * return_code );

###### Parameters

ActivationCode

[IN] This is the Activation Code that your application has collected (probably from the user) and is attempting to activate.

return_code

[OUT] This is (a pointer to) a numeric value that returns with a RETURNCODE that identifies the outcome of the operation.

###### Remarks

Note: This function is illustrated in the SoftwareShield Flowcharts - (see flow chart #2).

The InputActivationCode function takes as input an Activation Code from your application (probably collected from the user) and attempts to activate it.

Call this function when your application has collected an Activation Code from the user (or other source) and wishes to activate it in order to change the state of the license in some way.

Note that this function does not expect a passed Activation Code to correspond to any specific Authorization Definition in the license. It may correspond to any definition.

The function will attempt to validate and activate the code input. If the code is not valid for any reason, the return_code parameter will return holding some "false" value. Please refer to the SoftwareShield ClientProtector Control Flow Charts to determine possible false return codes.

If the code was successfully validated and activated the return_code parameter will (possibly) return holding some true value. Please refer to the SoftwareShield ClientProtector Control Flow Charts to determine possible return codes.

Note that your application must be prepared for all possible values of RETURNCODES.

###### Return Value

As with all COM function calls they return an HRESULT. HRESULT is a data type that is a 32-bit error or warning code. Check your compilers documentation for information on interpreting the HRESULT value.

###### Function Information

Exposed By Interface: | "ISSCProtector"
Exposed In COM Server Binaries: | "SSCProt.dll" and "SSCProtD.dll"